Contents

Source Header Tool

Version 1.0

© 1995 Objectech Corporation

What is Source Header Tool ?

A description of the Source Header Tool

Installation 16-Bit

Installing the Source Header tool on a 16 bit platform

Installation 32-Bit

Installing the Source Header tool on a 32 bit platform

General Usage

How to use the Source Header Tool

Source Header Mode

Method Header Mode

Configuration (.INI) File

Setup and layout of the configuration (.INI) file

Author

Copyright

Comment

Shareware

What is shareware?

Registration

How to register the Source Header Tool


General Usage

Once installed, you need only edit a file (with .C, .CPP, .CXX, .H, .HPP, .HXX or .INL extension) using the Microsoft Visual C++™ editor.

Source Header Mode

To insert a header at the top of the current file, simply select Tools/Source Header from the menu. This will "pop-up" the Source Header Tool dialog box, like this:

At this point you may select from the Author ComboBox or the Copyright ComboBox. You may add any comments to the Comment edit control.

Method Header Mode

To insert a header for a c function or C++ method (member function) simply select the entire function definition and invoke the Tools/Method Header from the menu. This will "pop-up" the Source Header Tool dialog box, like this:

At this point you may add any comments to the Comment edit controlcomment. Note that the select from the Author ComboBoxauthor and the Copyright ComboBox  are disabled in this mode.

Both Modes

Pressing OK will add the header to your file. Cancel will exit Source Header Tool without changing your file.

The FILE/EXIT menu choice will exit Source Header Tool without changing your file.

The FILE/About SRCHDR menu choice will display copyright and version information, and in the case of registered copies, the registration information.

The HELP menu choice will display information to assist using Source Header Tool.


Author ComboBox

The Author ComboBox supplies information for the Author field in the header -- shown in RED below:

// ********************

// File:        MAINDLG.CPP

// Author:      John Q. Public

// Description: The implementation file for the Main

//              Dialog Box of the XYZ Product.

// Copyright (c) 1994, XYZ, Inc. All rights reserved.

// ********************

The Author ComboBox looks like this:


Copyright ComboBox

The Copyright ComboBox supplies information for the Copyright field in the header -- shown in RED below:

// ********************

// File:        MAINDLG.CPP

// Author:      John Q. Public

// Description: The implementation file for the Main

//              Dialog Box of the XYZ Product.

// Copyright (c) 1994, XYZ, Inc. All rights reserved.

// ********************

The Copyright ComboBox looks like this:


Shareware

Shareware is "Try before you buy" software. It is not free! You may use this copy for a period of 30 days -- if you like it you should register it.

Registration costs only $15 and in addition to fulfilling your legal obligations, will provide:

>	A registered copy of the most recent version of Source Header Tool.

>	Printed documentation

>	1 year free upgrades

>	Discounts on other products from Objectech Corporation

>	Discounts on future products of Objectech Corporation


Registration

Registration costs only $15 and in addition to fulfilling your legal obligations, will provide:

>	A registered copy of the most recent version of Source Header Tool.

>	Printed documentation

>	1 year free upgrades

>	Discounts on other products from Objectech Corporation

>	Discounts on future products of Objectech Corporation

Just select the FILE/Print Topic menu choice, fill in the blanks and mail with $15 (check or money order please) to:

Objectech Corporation

Source Header Tool

P.O. Box 500342

San Diego, CA 92150-0342

Multiple-user (site licenses) are available - please write for more information or send E-Mail to:

CompuServe:	74020,2131

Internet:	74020.2131@compuserve.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -cut here - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Source Header Tool

Registration Form

Name: _____________________________________________________________

Company: __________________________________________________________

(if applicable)

Address: ___________________________________________________________

City, State Zip: _______________________________________________________

For our records, would you please tell us where you originally obtained the Shareware version?

____________________________________________________________________

____________________________________________________________________

 I am using/interested-in WindowsNT™/MSVC V2.x or Windows95™/MSVC V2.x

Other comments? _____________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________


Comment Field

The Comment edit control supplies information for the Comment field in the header -- shown in RED below:

// ********************

// File:        MAINDLG.CPP

// Author:      John Q. Public

// Description: The implementation file for the Main

//              Dialog Box of the XYZ Product.

// Copyright (c) 1994, XYZ, Inc. All rights reserved.

// ********************

The Comment edit control looks like this:


Configuration (.INI) Files

The configuration file (SRCHDR.INI) will be found in the windows directory. It is composed of two sections:

[COPYRIGHT]

CR1="(c) 1994 XYZ Corporation. All rights reserved."

CR2="(c) 1994 John Q. Public. All rights reserved."

CR3="(c) 1994 Widgets, Inc. All rights reserved."

CR4="Placed in the public domain - 1994 - Goode Samaritan"

Which provides up to 4 different copyright strings. Please note that the "©" symbol isn't supported here... Many editors and other tools cannot cope with it. Hopefully this will be able to be supported in future versions, but for now it causes more trouble than it's worth.

[AUTHOR]

A1="John Q. Public"

A2="Goode Samaritan"

A3="Johnny B. Goode"

A4="Darling Clementine"

Which provides up to 4 different author strings.

These strings are both used in such a way that the first (CR1 and A1) become the default Copyright and Author strings, respectively, in the SRCHDR main dialog box.


What is Source Header Tool?

The Source Header Tool  is a tool to assist users of Microsoft's Visual C++™ product (It is a 16-bit product, but will work with both V1.5x and the 32-bit V2.x). One of the things that most conscientious programmers would like to do is to place a standard file header and description in all of their source files and a description for each C function or C++ method (member function). Not only does this assist with documentation, but it is a handy place to include a copyright notice, etc. The only trouble is that it takes time to insert these headers, and it's easy to "do it later" (read: never) -- in spite of what a good idea it may be.

The Source Header Tool  removes these objections, and standardizes usage. It is designed to be installed directly into the customizable Tools menu of Visual C++™ and can be invoked with only 2 keystrokes.

Generally the Source Header Tool  will insert a header like this:

// ********************

// File:        MAINDLG.CPP

// Author:      John Q. Public

// Description: The implementation file for the Main

//              Dialog Box of the XYZ Product.

// Copyright (c) 1994, XYZ, Inc. All rights reserved.

// ********************

in addition, in header files it will add:

#ifndef __MAINDLG_H__

#define __MAINDLG_H__

at the top of the file, and:

#endif

at the bottom.

If used in the method header form with this function definition:

void CMyApp::UpdateDrawingNames( UINT nIndex, UINT sel )

 Source Header Tool will insert:

// ********************

// Function:    	CMyApp::UpdateDrawingNames

// Returns:     	void

// Args:        	UINT nIndex

// Description: 	Update the combobox on toolbar

//	 	to hold drawing names as appropriate

// ********************

See also: General Usage and Header Files


Header Files

In files with .H, .HPP, .HXX or .INL extensions Source Header Tool will place:

#ifndef __MAINDLG_H__

#define __MAINDLG_H__

at the top of the file, and:

#endif

at the bottom. To prevent multiple inclusion. (Note: _HPP, _HXX or _INL will replace the _H as appropriate.)

See also: General Usage


Installation 16-Bit
Installation - 16 Bit (MSVC V1.5x)

The Source Header Tool is easy to install; follow these steps:

Copy these files to the following directories:

File	Directory	Notes
SRCHDR.EXE	\MSVC\BIN or any directory you prefer
SRCHDR.HLP	\MSVC\BIN or the same directory as above
CTL3DV2.DLL	\WINDOWS\SYSTEM	If you already have a copy of CTL3DV2.DLL erase this copy - only one may exist on the system at a time, and it must be in the \WINDOWS\SYSTEM directory
SENDKEYS.DLL	\WINDOWS
1.	Start Microsoft Visual C++ and select the OPTIONS/TOOLS menu.

2.	Select ADD and fill in the dialog box like this:

3.	Select ADD again and fill in the dialog box like this:

The Source Header Tool is now installed.

For further information see General Usage and Configuration File (.INI).


Installation 32-Bit

Although the Source Header Tool is a 16-Bit product, it will work just fine with WindowsNT™ and Visual C++ V2.x (It has been tested with V3.5 Workstation and MSVC V2.1). It should also work with Windows95™, but this hasn't been tested yet. Registered users will receive full information about using the Source Header Tool with Windows95 as soon as it is fully tested - and information on the upcoming 32-bit version of the product.

Installation is essentially the same as with the 16-bit version with the exception of a few minor differences in the tools installation - NT has a TOOLS/Customize menu choice, and a properties sheet including a TOOLS tab. From that point the steps are the same as for a 16-Bit Installation.

For further information see General Usage and Configuration File (.INI).


Method Header

Body of method header topic.